package com.aaa.mapper;

import com.aaa.entity.Role;
import com.aaa.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer roleId);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> selectAll();

    List<String> findRoleIdByUserId(Integer userId);

    void deleteByUserId(Integer userId);

    void insertRoleId(@Param("userId") Integer userId, @Param("roleIds") Integer[] roleIds);

    /**
     * 根据条件检索用户信息
     * @param roleName
     * @param roleDesc
     * @return
     */
    List<Role> selectByCondition(@Param("roleName") String roleName, @Param("roleDesc") String roleDesc);
}